public class NumAdd {


    public static void main(String[] args) {
        System.out.println(add(3,5));
    }

    public static int add(int a,int b){
        while (b!=0){
            int curry=(a & b)<<1;
            a=a^b;
            b=curry;
        }
        return a;
    }
}
